package com.xique.job.task;

import com.xique.park.api.RemoteParkInAndOutService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 导出进出记录定时任务
 *
 * @author WLD
 */
@Slf4j
@RequiredArgsConstructor
@Component
public class DelInOutTask {

    private final RemoteParkInAndOutService remoteParkInAndOutService;

    /**
     * 定时删除进出记录
     */
    public void delete() {
        log.info("[定时任务]-定时删除进出记录");
        long startTime = System.currentTimeMillis();
        remoteParkInAndOutService.delete();
        log.info("[定时任务]-定时删除进出记录执行时间：{}", System.currentTimeMillis() - startTime);
    }

}
